package cn.edu.scau.cmi.linhongyu.adapter;

import java.util.ArrayList;
import java.util.List;

public class SortUtil {
	public List sort(List<Student> studentList) {
		int n = studentList.size();
		Student temp;
		for(int i=0;i<n;i++) {
			for(int j=0;j<i;j++) {
				if(studentList.get(j).getId()>studentList.get(i).getId()) {
					temp = studentList.get(j);
					studentList.set(j, studentList.get(i));
					studentList.set(i, temp);
				}
			}
		}
		return studentList;
	}
}
